package com.vanke.devops.domain.manager.docker.extend.impl;

import com.github.dockerjava.api.command.DockerCmdExecFactory;
import com.github.dockerjava.jaxrs.JerseyDockerCmdExecFactory;
import com.vanke.devops.domain.manager.docker.extend.DockerCmdExecFactoryExtend;
import com.vanke.devops.domain.manager.docker.extend.exec.InspectServiceCmdExec;
import com.vanke.devops.domain.manager.docker.extend.exec.ListNodesCmdExec;
import com.vanke.devops.domain.manager.docker.extend.exec.ListServicesCmdExec;
import com.vanke.devops.domain.manager.docker.extend.exec.ListTasksCmdExec;

/**
 * @author 陈景阳
 * @since 2018/6/7
 */
public class DockerCmdExecFactoryExtendImpl extends JerseyDockerCmdExecFactory implements DockerCmdExecFactoryExtend {

    @Override
    public ListServicesCmdExec createListServicesCmdExec() {
        return new ListServicesCmdExec(super.getBaseResource(), super.getDockerClientConfig());
    }

    @Override
    public InspectServiceCmdExec createInspectServiceCmdExec() {
        return new InspectServiceCmdExec(getBaseResource(),getDockerClientConfig());
    }

    @Override
    public ListTasksCmdExec createListTasksCmdExec() {
        return new ListTasksCmdExec(getBaseResource(),getDockerClientConfig());
    }

    @Override
    public ListNodesCmdExec createListNodesCmdExec() {
        return new ListNodesCmdExec(getBaseResource(),getDockerClientConfig());
    }
}
